package com.yutel.system.struts.action;

import java.util.List;
import java.util.Map;

import com.yutel.system.repository.SysUser;
import com.yutel.system.service.ISysUserService;
import com.yutel.system.struts.core.BaseAction;
import com.yutel.system.struts.core.Page;



public class SysUserAction extends BaseAction {
	private static final long serialVersionUID = 6353506933342390029L;

	List<Map<String, Object>> treeList = null;
	private Page page;
	private boolean success;
	private String msg;
	private ISysUserService sysUserService;
	private SysUser sysUser;
	public void login(){
		try {
			SysUser user=sysUserService.checkLogin(sysUser.getLoginName(), sysUser.getPassword(),"no");
			if(user==null) {
				success=false;
			} else {
				success=true;
			}
		} catch (Exception e) {
			success=false;
		}
	}
	public List<Map<String, Object>> getTreeList() {
		return treeList;
	}
	public void setTreeList(List<Map<String, Object>> treeList) {
		this.treeList = treeList;
	}
	public Page getPage() {
		return page;
	}
	public void setPage(Page page) {
		this.page = page;
	}
	public boolean isSuccess() {
		return success;
	}
	public void setSuccess(boolean success) {
		this.success = success;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public SysUser getSysUser() {
		return sysUser;
	}
	public void setSysUser(SysUser sysUser) {
		this.sysUser = sysUser;
	}
	public void setSysUserService(ISysUserService sysUserService) {
		this.sysUserService = sysUserService;
	}
}